package com.machine.filling.Test;

import android.graphics.PixelFormat;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.FragmentActivity;
import android.support.v7.app.AppCompatActivity;

import com.machine.filling.R;
import com.machine.filling.Test.ad.TestAdFragment;

/**
 * Created by Administrator on 2018/3/13 0013.
 */
@Deprecated
public class TestActivity extends AppCompatActivity {

    private static final String TAG = "TestActivity";
    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_test);
        getWindow().setFormat(PixelFormat.TRANSLUCENT);

        TestMainFragment testMainFragment =  new TestMainFragment();
        testMainFragment.setChangeFg(new TestMainFragment.ChangeFg() {
            @Override
            public void changeHttp(FragmentActivity activity) {
//                getSupportFragmentManager().beginTransaction().replace(R.id.framelayout4,new TestHttpFragment()).commit();
                getSupportFragmentManager().beginTransaction().replace(R.id.framelayout4,new TestAdFragment()).commit();
            }

            @Override
            public void changePort(FragmentActivity activity) {
                getSupportFragmentManager().beginTransaction().replace(R.id.framelayout4,new TestPortFragment()).commit();
            }
        });
        getSupportFragmentManager().beginTransaction().replace(R.id.framelayout4,testMainFragment).commit();

    }
}
